package com.db.patterns.prototype.demo03;

/**
 * 抽象的建造者
 */
public abstract class Builder {
    protected Computer computer = new Computer();

    public abstract void buildCpu();

    public abstract void buildMemory();

    public abstract void buildMotherboard();

    public abstract void buildPowerSupply();

    public abstract void buildGraphicsCard();

    public abstract void buildSolidState();

    public abstract void buildChassis();

    public abstract Computer createComputer();

    public Computer construct(){
        this.buildCpu();
        this.buildMemory();
        this.buildMotherboard();
        this.buildPowerSupply();
        this.buildGraphicsCard();
        this.buildSolidState();
        this.buildChassis();
        return computer;
    }
}
